home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9617 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  765 b 

  1. Path: news.clark.net!not-for-mail
  2. From: gusty@clark.net (Harlan Messinger)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Leap year
  5. Date: 1 Mar 1996 17:56:20 GMT
  6. Organization: Clark Internet Services, Inc., Ellicott City, MD USA
  7. Message-ID: <4h7do4$cd4@clarknet.clark.net>
  8. References: <3135A7F2.2120@hiwaay.net>
  9. NNTP-Posting-Host: explorer.clark.net
  10. Mime-Version: 1.0
  11. Content-Type: TEXT/PLAIN; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-Newsreader: TIN [UNIX 1.3 950726BETA PL0]
  14.  
  15. Lance Perry (lperry@hiwaay.net) wrote:
  16. : Can someone be kind enough to post the formula for Leap Year
  17. : or point me to the place where this can be found?
  18. : lperry@hiwaay.net
  19.  
  20. bool IsLeapYear(int year) {
  21.     return (year % 4 == 0) &&
  22.         ( (year % 100 != 0) || (year % 400 == 0) ) ;
  23. }
  24.  
  25.